<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<ui:composition xmlns:ui="http://java.sun.com/jsf/facelets"
                template="./WEB-INF/includes/template.xhtml"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns="http://www.w3.org/1999/xhtml"
                xmlns:c="http://java.sun.com/jsp/jstl/core">

    <ui:define name="metadata">
        <f:metadata>
            <f:event type="preRenderView" listener="#{leaveBacking.fillForm(param.action,param.taskid)}"/>
        </f:metadata>
    </ui:define>

    <ui:define name="title">
        请假单--OfficeBoost System
    </ui:define>





    <ui:define name="content">
        <h:form>
            <font size="3" color="blue">
                <h:outputLabel value="请假单"/>
            </font>          
            
            <h:panelGrid columns="2" frame="hsides">
                <h:outputLabel value="申请人"/>
                <h:outputText value="#{leaveBacking.name}" id="name" />
                <h:outputLabel value="学号"/>
                <h:outputText value="#{leaveBacking.id}" id="ID"/>
                <h:outputText value="请假时间"/>
                <h:inputText value="#{leaveBacking.time_span}"  size="40" id="time_span"  readonly="#{leaveBacking.disabled[0]}"/>
                <h:outputText value="请假理由"/>
                <h:inputTextarea value="#{leaveBacking.reason}"  rows="8" cols="40" id="reason" readonly="#{leaveBacking.disabled[0]}"/>

                <h:outputLabel value="班主任意见"/>
                <h:inputTextarea value="#{leaveBacking.teacher_opinion}"  rows="8" cols="40" id="teacher_opinion" readonly="#{leaveBacking.disabled[1]}"/>
              
                <h:outputLabel value="学工办意见"/>
                <h:inputTextarea value="#{leaveBacking.student_office_opinion}"  rows="8" cols="40" id="student_office_opinion" readonly="#{leaveBacking.disabled[2]}"/>             
 
                <h:outputLabel value="教务办意见"/>
                <h:inputTextarea value="#{leaveBacking.education_office_opinion}"  rows="8" cols="40" id="education_office_opinion" readonly="#{leaveBacking.disabled[3]}"/>
    
                <h:outputLabel value="学院意见"/>
                <h:inputTextarea value="#{leaveBacking.school_opinion}"  rows="8" cols="40" id="school_opinion" readonly="#{leaveBacking.disabled[4]}"/>
            
            </h:panelGrid>           
                <h:selectOneRadio value="#{leaveBacking.decision}" readonly="#{leaveBacking.disabled[4]}"  >
                    <f:selectItem itemLabel="同意" itemValue="agree"/>
                    <f:selectItem itemLabel="拒绝" itemValue="refuse"/>
                </h:selectOneRadio>
                  
               <h:commandButton value="提交" action="#{leaveBacking.applyForm()}"  
                                onclick="if(!confirm('Are you sure you want to commit?')) return false">
                   <f:param name="myparam" value="#{param.action}"/>
                   <f:param name="mytaskid" value="#{param.taskid}"/>
               </h:commandButton>
          
     
        </h:form>
    </ui:define>



</ui:composition>
